package com.backend.springboot_project_demo.controller;

import com.backend.springboot_project_demo.common.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/files")
public class FileController {

    @PostMapping("/upload")
    public Result<?> uploadFile(MultipartFile file) {
        String originalFilename = file.getOriginalFilename();
        String rootFilePath = System.getProperty("user.dir") + "/springboot_project_demo/src/main/resources/files" + originalFilename;
        return Result.success();
    }
}
